3.154 \(\int \frac{f+g x+h x^2}{(d+e x)^3 (a+b x+c x^2)} \, dx\)

Optimal. Leaf size=509 \[ -\frac{\log \left (a+b x+c x^2\right ) \left (e^3 \left (a^2 h-a b g+b^2 f\right )-c \left (a e \left (3 d^2 h-3 d e g+e^2 f\right )+b \left (3 d e^2 f-d^3 h\right )\right )+c^2 d^2 (3 e f-d g)\right )}{2 \left (a e^2-b d e+c d^2\right )^3}+\frac{\log (d+e x) \left (e^3 \left (a^2 h-a b g+b^2 f\right )-c \left (a e \left (3 d^2 h-3 d e g+e^2 f\right )+b \left (3 d e^2 f-d^3 h\right )\right )+c^2 d^2 (3 e f-d g)\right )}{\left (a e^2-b d e+c d^2\right )^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c \left (2 a^2 e^2 (e g-3 d h)-3 a b e \left (d^2 (-h)-d e g+e^2 f\right )+b^2 \left (-\left (d^3 h+3 d e^2 f\right )\right )\right )-b e^3 \left (a^2 h-a b g+b^2 f\right )-c^2 d \left (2 a \left (d^2 h-3 d e g+3 e^2 f\right )+b d (d g+3 e f)\right )+2 c^3 d^3 f\right )}{\sqrt{b^2-4 a c} \left (a e^2-b d e+c d^2\right )^3}-\frac{d^2 h-d e g+e^2 f}{2 e (d+e x)^2 \left (a e^2-b d e+c d^2\right )}-\frac{a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)}{(d+e x) \left (a e^2-b d e+c d^2\right )^2} \]

[Out]

-(e^2*f - d*e*g + d^2*h)/(2*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^2) - (c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) -
b*(e^2*f - d^2*h))/((c*d^2 - b*d*e + a*e^2)^2*(d + e*x)) - ((2*c^3*d^3*f - b*e^3*(b^2*f - a*b*g + a^2*h) - c^2
*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f - 3*d*e*g + d^2*h)) - c*(2*a^2*e^2*(e*g - 3*d*h) - 3*a*b*e*(e^2*f - d*e*g
 - d^2*h) - b^2*(3*d*e^2*f + d^3*h)))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*
e + a*e^2)^3) + ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g + a^2*h) - c*(a*e*(e^2*f - 3*d*e*g + 3*d^2*h) + b
*(3*d*e^2*f - d^3*h)))*Log[d + e*x])/(c*d^2 - b*d*e + a*e^2)^3 - ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g
+ a^2*h) - c*(a*e*(e^2*f - 3*d*e*g + 3*d^2*h) + b*(3*d*e^2*f - d^3*h)))*Log[a + b*x + c*x^2])/(2*(c*d^2 - b*d*
e + a*e^2)^3)

________________________________________________________________________________________

Rubi [A]  time = 1.25078, antiderivative size = 509, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {1628, 634, 618, 206, 628} \[ -\frac{\log \left (a+b x+c x^2\right ) \left (e^3 \left (a^2 h-a b g+b^2 f\right )-a c e \left (3 d^2 h-3 d e g+e^2 f\right )-b c \left (3 d e^2 f-d^3 h\right )+c^2 d^2 (3 e f-d g)\right )}{2 \left (a e^2-b d e+c d^2\right )^3}+\frac{\log (d+e x) \left (e^3 \left (a^2 h-a b g+b^2 f\right )-a c e \left (3 d^2 h-3 d e g+e^2 f\right )-b c \left (3 d e^2 f-d^3 h\right )+c^2 d^2 (3 e f-d g)\right )}{\left (a e^2-b d e+c d^2\right )^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c \left (2 a^2 e^2 (e g-3 d h)-3 a b e \left (d^2 (-h)-d e g+e^2 f\right )+b^2 \left (-\left (d^3 h+3 d e^2 f\right )\right )\right )-b e^3 \left (a^2 h-a b g+b^2 f\right )-c^2 d \left (2 a \left (d^2 h-3 d e g+3 e^2 f\right )+b d (d g+3 e f)\right )+2 c^3 d^3 f\right )}{\sqrt{b^2-4 a c} \left (a e^2-b d e+c d^2\right )^3}-\frac{d^2 h-d e g+e^2 f}{2 e (d+e x)^2 \left (a e^2-b d e+c d^2\right )}-\frac{a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )+c d (2 e f-d g)}{(d+e x) \left (a e^2-b d e+c d^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x + h*x^2)/((d + e*x)^3*(a + b*x + c*x^2)),x]

[Out]

-(e^2*f - d*e*g + d^2*h)/(2*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^2) - (c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) -
b*(e^2*f - d^2*h))/((c*d^2 - b*d*e + a*e^2)^2*(d + e*x)) - ((2*c^3*d^3*f - b*e^3*(b^2*f - a*b*g + a^2*h) - c^2
*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f - 3*d*e*g + d^2*h)) - c*(2*a^2*e^2*(e*g - 3*d*h) - 3*a*b*e*(e^2*f - d*e*g
 - d^2*h) - b^2*(3*d*e^2*f + d^3*h)))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(c*d^2 - b*d*
e + a*e^2)^3) + ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g + a^2*h) - a*c*e*(e^2*f - 3*d*e*g + 3*d^2*h) - b*
c*(3*d*e^2*f - d^3*h))*Log[d + e*x])/(c*d^2 - b*d*e + a*e^2)^3 - ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g
+ a^2*h) - a*c*e*(e^2*f - 3*d*e*g + 3*d^2*h) - b*c*(3*d*e^2*f - d^3*h))*Log[a + b*x + c*x^2])/(2*(c*d^2 - b*d*
e + a*e^2)^3)

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{f+g x+h x^2}{(d+e x)^3 \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac{e^2 f-d e g+d^2 h}{\left (c d^2-b d e+a e^2\right ) (d+e x)^3}+\frac{e \left (c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )\right )}{\left (c d^2-b d e+a e^2\right )^2 (d+e x)^2}+\frac{e \left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right )}{\left (c d^2-b d e+a e^2\right )^3 (d+e x)}+\frac{c^3 d^3 f-b e^3 \left (b^2 f-a b g+a^2 h\right )+c e^2 \left (3 b^2 d f+a b (2 e f-3 d g)-a^2 (e g-3 d h)\right )-c^2 d \left (3 b d e f+a \left (3 e^2 f-3 d e g+d^2 h\right )\right )-c \left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) x}{\left (c d^2-b d e+a e^2\right )^3 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=-\frac{e^2 f-d e g+d^2 h}{2 e \left (c d^2-b d e+a e^2\right ) (d+e x)^2}-\frac{c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )}{\left (c d^2-b d e+a e^2\right )^2 (d+e x)}+\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}+\frac{\int \frac{c^3 d^3 f-b e^3 \left (b^2 f-a b g+a^2 h\right )+c e^2 \left (3 b^2 d f+a b (2 e f-3 d g)-a^2 (e g-3 d h)\right )-c^2 d \left (3 b d e f+a \left (3 e^2 f-3 d e g+d^2 h\right )\right )-c \left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) x}{a+b x+c x^2} \, dx}{\left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{e^2 f-d e g+d^2 h}{2 e \left (c d^2-b d e+a e^2\right ) (d+e x)^2}-\frac{c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )}{\left (c d^2-b d e+a e^2\right )^2 (d+e x)}+\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 \left (c d^2-b d e+a e^2\right )^3}+\frac{\left (2 c^3 d^3 f-b e^3 \left (b^2 f-a b g+a^2 h\right )-c^2 d \left (b d (3 e f+d g)+2 a \left (3 e^2 f-3 d e g+d^2 h\right )\right )-c \left (2 a^2 e^2 (e g-3 d h)-3 a b e \left (e^2 f-d e g-d^2 h\right )-b^2 \left (3 d e^2 f+d^3 h\right )\right )\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 \left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{e^2 f-d e g+d^2 h}{2 e \left (c d^2-b d e+a e^2\right ) (d+e x)^2}-\frac{c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )}{\left (c d^2-b d e+a e^2\right )^2 (d+e x)}+\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log \left (a+b x+c x^2\right )}{2 \left (c d^2-b d e+a e^2\right )^3}-\frac{\left (2 c^3 d^3 f-b e^3 \left (b^2 f-a b g+a^2 h\right )-c^2 d \left (b d (3 e f+d g)+2 a \left (3 e^2 f-3 d e g+d^2 h\right )\right )-c \left (2 a^2 e^2 (e g-3 d h)-3 a b e \left (e^2 f-d e g-d^2 h\right )-b^2 \left (3 d e^2 f+d^3 h\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{\left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{e^2 f-d e g+d^2 h}{2 e \left (c d^2-b d e+a e^2\right ) (d+e x)^2}-\frac{c d (2 e f-d g)+a e (e g-2 d h)-b \left (e^2 f-d^2 h\right )}{\left (c d^2-b d e+a e^2\right )^2 (d+e x)}-\frac{\left (2 c^3 d^3 f-b e^3 \left (b^2 f-a b g+a^2 h\right )-c^2 d \left (b d (3 e f+d g)+2 a \left (3 e^2 f-3 d e g+d^2 h\right )\right )-c \left (2 a^2 e^2 (e g-3 d h)-3 a b e \left (e^2 f-d e g-d^2 h\right )-b^2 \left (3 d e^2 f+d^3 h\right )\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (c d^2-b d e+a e^2\right )^3}+\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{\left (c^2 d^2 (3 e f-d g)+e^3 \left (b^2 f-a b g+a^2 h\right )-a c e \left (e^2 f-3 d e g+3 d^2 h\right )-b c \left (3 d e^2 f-d^3 h\right )\right ) \log \left (a+b x+c x^2\right )}{2 \left (c d^2-b d e+a e^2\right )^3}\\ \end{align*}

Mathematica [A]  time = 0.902485, size = 504, normalized size = 0.99 \[ -\frac{\log (d+e x) \left (e^3 \left (-\left (a^2 h-a b g+b^2 f\right )\right )+a c e \left (3 d^2 h-3 d e g+e^2 f\right )+b c \left (3 d e^2 f-d^3 h\right )+c^2 d^2 (d g-3 e f)\right )}{\left (e (a e-b d)+c d^2\right )^3}+\frac{\log (a+x (b+c x)) \left (e^3 \left (-\left (a^2 h-a b g+b^2 f\right )\right )+a c e \left (3 d^2 h-3 d e g+e^2 f\right )+b c \left (3 d e^2 f-d^3 h\right )+c^2 d^2 (d g-3 e f)\right )}{2 \left (e (a e-b d)+c d^2\right )^3}+\frac{\tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (-c \left (-2 a^2 e^2 (e g-3 d h)+3 a b e \left (d^2 (-h)-d e g+e^2 f\right )+b^2 \left (d^3 h+3 d e^2 f\right )\right )+b e^3 \left (a^2 h-a b g+b^2 f\right )+c^2 d \left (2 a \left (d^2 h-3 d e g+3 e^2 f\right )+b d (d g+3 e f)\right )-2 c^3 d^3 f\right )}{\sqrt{4 a c-b^2} \left (e (b d-a e)-c d^2\right )^3}-\frac{d^2 h-d e g+e^2 f}{2 e (d+e x)^2 \left (e (a e-b d)+c d^2\right )}+\frac{a e (2 d h-e g)+b \left (e^2 f-d^2 h\right )+c d (d g-2 e f)}{(d+e x) \left (e (a e-b d)+c d^2\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x + h*x^2)/((d + e*x)^3*(a + b*x + c*x^2)),x]

[Out]

-(e^2*f - d*e*g + d^2*h)/(2*e*(c*d^2 + e*(-(b*d) + a*e))*(d + e*x)^2) + (c*d*(-2*e*f + d*g) + a*e*(-(e*g) + 2*
d*h) + b*(e^2*f - d^2*h))/((c*d^2 + e*(-(b*d) + a*e))^2*(d + e*x)) + ((-2*c^3*d^3*f + b*e^3*(b^2*f - a*b*g + a
^2*h) + c^2*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f - 3*d*e*g + d^2*h)) - c*(-2*a^2*e^2*(e*g - 3*d*h) + 3*a*b*e*(e
^2*f - d*e*g - d^2*h) + b^2*(3*d*e^2*f + d^3*h)))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/(Sqrt[-b^2 + 4*a*c]*
(-(c*d^2) + e*(b*d - a*e))^3) - ((c^2*d^2*(-3*e*f + d*g) - e^3*(b^2*f - a*b*g + a^2*h) + a*c*e*(e^2*f - 3*d*e*
g + 3*d^2*h) + b*c*(3*d*e^2*f - d^3*h))*Log[d + e*x])/(c*d^2 + e*(-(b*d) + a*e))^3 + ((c^2*d^2*(-3*e*f + d*g)
- e^3*(b^2*f - a*b*g + a^2*h) + a*c*e*(e^2*f - 3*d*e*g + 3*d^2*h) + b*c*(3*d*e^2*f - d^3*h))*Log[a + x*(b + c*
x)])/(2*(c*d^2 + e*(-(b*d) + a*e))^3)

________________________________________________________________________________________

Maple [B]  time = 0.194, size = 1945, normalized size = 3.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x^2+g*x+f)/(e*x+d)^3/(c*x^2+b*x+a),x)

[Out]

-2/(a*e^2-b*d*e+c*d^2)^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*a*c^2*d^3*h+1/(a*e^2-b*d*e+c*d^
2)^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2*c*d^3*h-1/(a*e^2-b*d*e+c*d^2)^3/(4*a*c-b^2)^(1/
2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*c^2*d^3*g-3/2/(a*e^2-b*d*e+c*d^2)^3*c*ln(c*x^2+b*x+a)*a*d*e^2*g+3/(a*
e^2-b*d*e+c*d^2)^3*ln(e*x+d)*a*c*d*e^2*g-3/(a*e^2-b*d*e+c*d^2)^3*ln(e*x+d)*b*c*d*e^2*f-3/(a*e^2-b*d*e+c*d^2)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)*a
rctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*c^3*d^3*f+1/2/(a*e^2-b*d*e+c*d^2)^3*c*ln(c*x^2+b*x+a)*a*e^3*f-1/2/(a*e^2-b*
d*e+c*d^2)^3*c*ln(c*x^2+b*x+a)*b*d^3*h-3/2/(a*e^2-b*d*e+c*d^2)^3*c^2*ln(c*x^2+b*x+a)*d^2*e*f+1/2/(a*e^2-b*d*e+
c*d^2)^3*ln(c*x^2+b*x+a)*a*b*e^3*g

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x^2+g*x+f)/(e*x+d)^3/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x^2+g*x+f)/(e*x+d)^3/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x**2+g*x+f)/(e*x+d)**3/(c*x**2+b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.26058, size = 1353, normalized size = 2.66 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x^2+g*x+f)/(e*x+d)^3/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

1/2*(c^2*d^3*g - b*c*d^3*h - 3*c^2*d^2*f*e + 3*a*c*d^2*h*e + 3*b*c*d*f*e^2 - 3*a*c*d*g*e^2 - b^2*f*e^3 + a*c*f
*e^3 + a*b*g*e^3 - a^2*h*e^3)*log(c*x^2 + b*x + a)/(c^3*d^6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